package com.deryun.tyl.bean.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import com.deryun.tyl.bean.MutiPic;

public interface MutiPicMapper {
	
	@Select({
		"SELECT * FROM mutiPic WHERE type = #{0,jdbcType=INTEGER}"
	})
	List<MutiPic> getPicByType(int type);
	
	@Insert({
		"INSERT INTO mutiPic (artId,type,picPath) VALUES ("
		+ "#{artId,jdbcType=VARCHAR},"
		+ "#{type,jdbcType=VARCHAR},"
		+ "#{picPath,jdbcType=VARCHAR}"
		+ ")"
	})
	int addPic(MutiPic mutiPic);
	
	@Delete({
		"DELETE FROM mutipic WHERE id = #{0,jdbcType=INTEGER}"
	})
	int delPic(int id);
}
